CURL_INCLUDE = /Users/nakada/pacakges/include
#CFLAGS = -DUSE_CURL
CFLAGS = -DUSE_CURL -fno-stack-protector
.cc.o:
	$(CC) -c -I../include -I$(CURL_INCLUDE) $(CFLAGS) -g -o $@ $<

SRCS    = \
	ProtocolFactory.cc\
	HttpProtocol.cc\
	RelativeFileProtocol.cc\
	Protocol.cc\
	remote_matrix.cc\
	Credential.cc


OBJS   = $(SRCS:.cc=.o)

libDataMngt.a: $(OBJS)
	ar rsucv $@ $(OBJS)
	cp $@ ../lib

clean:
	rm -rf *.o *.a test_remote_matrix test

HttpProtocol.test.o: HttpProtocol.cc
	g++ -g -o $@ -DMAIN -c -g $<

httpTest: HttpProtocol.test.o
	g++ -g -o $@ Protocol.o HttpProtocol.test.o -lcurl

test: test.o Protocol.o HttpProtocol.o
	g++ -g -o $@ $< Protocol.o HttpProtocol.o -lcurl

test_remote_matrix: test_remote_matrix.o libDataMngt.a
	g++ -g -o $@ $<  -L. -lDataMngt -lcurl